package com.sky.mapper;

import com.sky.dto.GoodsSalesDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface ReportMapper {
    @Select("select sum(amount) from orders where status = 5 and order_time > #{begin} and order_time < #{end}")
    BigDecimal getAmount(LocalDateTime begin,LocalDateTime end);
    Integer getUseramount(LocalDateTime begin,LocalDateTime end);

    List<GoodsSalesDTO> getTOP_sales(LocalDateTime begin,LocalDateTime end);
}
